<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:composite="http://java.sun.com/jsf/composite">

    <h:head>
        <f:facet name="first">
            <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
        </f:facet>
    </h:head>

    <composite:interface>
        <composite:attribute name="lblbtnfind" type="java.lang.String" />
        <composite:attribute name="update" type="java.lang.String" />
    </composite:interface>

    <composite:implementation>

        <p:outputPanel>
            <p:commandButton id="btnFindAddDetalle" value="#{cc.attrs.lblbtnfind}" actionListener="#{MBComponenteAddVentaDetalleND.cargaInicial}"
                             icon="ui-icon-plus" immediate="true" update="pnlFindOrden" process="@this" ajax="true"
                             oncomplete="wv#{cc.id}.show()" style="font-size:10px;">
            </p:commandButton>	
        </p:outputPanel>

        <p:dialog id="idFindCliente" header="Adicionando conceptos" showEffect="explode"
                  widgetVar="wv#{cc.id}" modal="true" maximizable="true">

                <p:panelGrid id="pnlFindOrden" style="width:100%;text-align:left">


                    <p:row>
                        <p:column>
                            <h:outputLabel id="lblDescripcion" value="Descripcion " />
                        </p:column>
                        <p:column>
                            <p:inputTextarea id="txtDescripcion"  onkeyup="cambiarMayuscula(this)" cols="50" rows="20"
                                             value="#{BKComponenteAddVentaDetalleND.descripcion}" />
                        </p:column>

                    </p:row>

                    <p:row>
                        <p:column>
                            <h:outputLabel id="lblTotal" value="Total " />
                        </p:column>
                        <p:column>
                            <p:inputText id="txtTotal"  onkeyup="cambiarMayuscula(this)" 
                                         value="#{BKComponenteAddVentaDetalleND.total}" />
                        </p:column>

                    </p:row>
                    <p:row>
                        <p:column style="text-align:center" colspan="3">
                            <p:commandButton id="btnAceptarArticulos" value="Aceptar"
                                             actionListener="#{MBComponenteAddVentaDetalleND.notificarObservadores()}"
                                             process="@this,txtDescripcion,txtTotal" update="#{cc.attrs.update}"  
                                             onclick="wv#{cc.id}.hide();" />
                            <p:commandButton id="btnCancelarArticulos" value="Cancelar" type="button"
                                             onclick="wv#{cc.id}.hide();" />
                        </p:column>
                    </p:row>
                </p:panelGrid>
            </p:dialog>



    </composite:implementation>

</html>
